import request from "@/utils/request.ts";

/**
 * 数仓 额外接口
 * @author Finn Yu
 * @since 2023/7/9 00:29
 */
const BASE_PATH = '/db-gateway';

// 获取区域树
export function getRegionInfoTree(params?: { zoneCode?: string, depth?: string|number }) {
    return request(`${BASE_PATH}/extra/regionInfo/tree`, {
        params,
    })
}

// 获取最近的一天节假日
export async function getLastHoliday() {
    return request(`${BASE_PATH}/extra/holiday/getHolidayLast`)
}

// 获取节假日列表
export async function getHolidays(params: any) {
    return request(`${BASE_PATH}/extra/holiday/list`, {
        params
    });
}


//获取临时图片地址
export function getUrlOneHours(params: any) {
    return request(`${BASE_PATH}/file/openDocument/getUrlOneHours`, {
        params,
    });
}